<template>
  <div class="goodsActivity-table__container">
    <!-- 表格部分 -->
    <el-table :data="courseList" height="300">
      <el-table-column
        prop="name"
        label="分组名称"
        align="center"
      ></el-table-column>
      <el-table-column label="操作" width="70">
        <template slot-scope="scope">
          <el-button type="text" @click="handleDelete(scope.$index)">
            删除
          </el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  props: {
    courseList: {
      type: Array,
      default: ()=> []
    }
  },
  data() {
    return {}
  },
  methods: {
    // 删除操作
    handleDelete(index) {
      this.$emit('deleteGrouping', index)
    }
  }
}
</script>

<style lang="less" scoped>
.goodsActivity-table__container {
  margin: 0 0 18px 100px;
}
</style>
